package com.bjpowernode.crm.commons.utils;

import com.bjpowernode.crm.commons.Constant;

import java.util.HashMap;

/**
 * ClassName: Result<br/>
 * Package: com.bjpowernode.crm.commons.utils<br/>
 * Description: <br/>
 * Date: 2022/6/11 21:15<br/>
 * Auther:对的我写的，错的我同事写的<br/>
 */
public class Result extends HashMap<String,Object> {

    public static Result success()
    {
        Result result=new Result();
        result.put(Constant.CODE,Constant.SUCCESS_NUMBER);
        return result;
    }
    public static Result success(String s)
    {
        Result result=new Result();
        result.put(Constant.CODE,Constant.SUCCESS_NUMBER);
        result.put(Constant.MESSAGE, s);
        return result;
    }
    public static Result fail(String msg)
    {
        Result result = new Result();
        result.put(Constant.CODE,Constant.FAIL_NUMBER);
        result.put(Constant.MESSAGE, msg);
        return result;
    }
}
